package com.htudata.convention.constant;

import lombok.Getter;
import lombok.Setter;

public enum RespStatusEnum {
  SUCCESS(0, "success"),
  NO_PERMISSION(100, "no permission"),
  UNAUTHORIZED_CLIENT_IP_ADDRESS(101, "unauthorized client ip address"),
  NO_PERMISSION_TO_ACCESS_DATA(102, "no permission to access data"),
  INVALID_API_KEY(103, "invalid api key"),
  INCORRECT_SIGNATURE(104, "incorrect signature"),
  INVALID_TIMESTAMP(105, "invalid timestamp"),
  INVALID_USER_ID(106, "invalid user id"),
  ACCESS_TOKEN_INVALID(107, "access token invalid"),
  ACCESS_TOKEN_EXPIRED(108, "access token expired"),
  SESSION_KEY_EXPIRED(109, "session key expired"),
  INVALID_PARAMETER(300, "invalid parameter"),
  TOO_MANY_PARAMETERS(301, "too many parameters"),
  LACK_OF_NECESSARY_PARAMETERS(302, "lack of necessary parameters"),
  UNKNOWN_ERROR(500, "unknown error"),
  SERVICE_TEMPORARILY_UNAVAILABLE(501, "service temporarily unavailable"),
  DATABASE_ERROR(502, "database error"),
  INTERNAL_ERROR(503, "internal error"),
  UNSUPPORTED_OPENAPI_METHOD(504, "unsupported openapi method"),
  CUSTOM_MSG(999, "");

  @Getter
  @Setter
  private int code;
  @Getter
  @Setter
  private String msg;
  
  RespStatusEnum(int code, String msg) {
    this.code = code;
    this.msg = msg;
  }

}
